package ru.eugenetulupov.nsutimetable.backend;

import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.json.JSONException;
import org.json.JSONObject;

public class TestServlet extends HttpServlet {
	@Override
	protected void doGet(HttpServletRequest req, HttpServletResponse resp)
			throws ServletException, IOException {
		resp.setContentType("text/plain");
		resp.setCharacterEncoding("utf-8");
		JSONObject object = new JSONObject();
		try {
			 
			object.put("xxx", 123);
			object.put("yyy", "Привет ا Hello");
			resp.getWriter().println(object.toString());
		} catch (JSONException e) {

			e.printStackTrace();
		}
	}
}
